package com.wjc.common.utils

import java.util.*

/**
 * ClassName: com.wjc.common.utils
 * Description:时间转换工具
 * JcChen on 2021.05.29.17:08
 */

/**
 * 将毫秒转换为分秒-00:00格式
 */
fun stringForTime(timeMs: Int): String {
    val totalSeconds = timeMs / 1000
    val seconds = totalSeconds % 60
    val minutes = (totalSeconds / 60) % 60

    return Formatter().format("%02d:%02d", minutes, seconds).toString();
}